<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 28. w < 字符串练习 > rgba转颜色 & 透明度
        function rgba2color(input) {
            // to do
            return xxx;
        }
        console.log(color2rgba('rgba(255, 0, 0, 0.5)')); // 'color: #ff0000; opacity: 0.5;'
        console.log(color2rgba('rgba(254, 0, 103, 0.9)')); // 'color: #fe0068; opacity: 0.9;'
    </script>
</body>
</html>